Repository navigation
Ocarina of Time: 33 fixes and extras from other forks and open upstream PRs - #1
Merged
Merged
Conversation
…with the bound, Ocarina of Time read zeros past its bindings, and the vertices of its horses, of Link's slingshot and of the ReDeads stretched to the origin or flickered Squashed from: - e545efe Know-It-All-Brother: Switch 2 games' uniform reads are not bounded by the binding's size: with the bound, Ocarina of Time read zeros past its bindings, - c810a43 Know-It-All-Brother: The symptom index, the uniform bound's entry and Ocarina of Time's note name the stretched and flickering vertices and link issue Source: PR seedds#2219 (Know-It-All-Brother); original commit(s) e545efe c810a43 Conflict: dm/games/0400486024DEC000/README.md (Found on this game list), resolved by keeping main's NaN-colour entry and adding this one after it.
…Ocarina of Time's flower bushes no longer show holes in Hyrule Castle's courtyard The foliage cull is a chain of compute dispatches in which a later one is indirect, its group counts written by an earlier one. Dispatches share the copy encoder, each after a barrier inside it, and that barrier did not order the indirect dispatch's counts after the earlier dispatch: in about 40 % of frames (M1 Max) the cull left 16 of its 276 leaf clusters out, and the leaf and flower meshes drew a short list, the bush's dark inner body showing through. - dispatch (ind_split): an indirect dispatch does not join a copy encoder that already holds work; the encoder ends, the next begins with a queue barrier. Direct dispatches keep sharing it. DM_NVN_IND_SPLIT=0 brings the old order back (to measure). - docs/reference/rendering.md: the entry, with the measurements and what is not known; the game note; the symptom index regenerated. Measured on Ocarina of Time standing still in the courtyard, the leaf list's count read when each submission completed, 240-300 frames a setting, flipped live in one session by lab switches not in this change: old order 39 %, 41 %, 47 % of frames short; this change 0 of 600; an encoder for every dispatch 0; for the direct ones only 41 %. Every uniform and small storage input of the five cull shaders, dumped for 662 frames, followed none of the drops. 24 shots: 0 with holes, 9 with DM_NVN_IND_SPLIT=0. Which read misses the encoder barrier (the indirect-argument fetch or the copy of the counts into the driver segment) is not known; a synthetic writer / indirect reader pair did not fail with the old order (0 of 100, also through two chunk buffers of a large pool). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#2226 (humanperzeus); original commit(s) 5c91d81 Conflict: dm/games/0400486024DEC000/README.md (Found on this game list), resolved by keeping every entry.
Source: PR seedds#2136 (thehobbit85; commit authored as seedds); original commit(s) 3d8afce
…efault 614.4 MHz, unchanged); a Switch 2 game that reads reports at the system counter rate (Ocarina of Time) had its wind and particle time step 19.66 times too large Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Squashed from: - bb1f6c9 padsiwono: Profile key gpu_ts_hz: the tick rate of the raw counter timestamps (default 614.4 MHz, unchanged); a Switch 2 game that reads reports at the - 680ab9f padsiwono: Ocarina of Time: gpu_ts_hz 31250000, the game reads raw counter reports at the Switch 2's system counter rate (wind and leaves 19.66 times t - 4a63080 padsiwono: t_nvn: the 1 ms counter check uses the profile's report rate (nvn_ts_hz() / 1000 ticks), so it also holds with Ocarina of Time's gpu_ts_hz - 1fba7c9 akratch: nvn_ts_hz: the lazily cached rate is a relaxed atomic, so first timestamp queries from several threads no longer race on it (ThreadSanitizer r Source: PR seedds#1714 (padsiwono); original commit(s) bb1f6c9 680ab9f 4a63080 1fba7c9 Conflicts: dm/games/game.py and dm/games/0400486024DEC000/game.tsv carried the gpu_timestamps key, which main has since removed (3304d6a, segment timestamps for every game); kept only the gpu_ts_hz lines. The game note's tables: kept every entry. Co-authored-by: akratch <70729875+akratch@users.noreply.github.com>
…t (PR seedds#2226) reads PR seedds#2226 (5c89588 here) reads DM_NVN_IND_SPLIT but its head did not add the switch to docs/env_switches.tsv, so dm/tools/tests/test_env_switches.py failed on this branch. Row written by dm/tools/env_switches.py, meaning by hand.
… to hold 3: a frame whose cost is above every hold and that breaks a run of 30 frames on time starts a grace with no trial, so Ocarina of Time holds 60 fps as Kokiri Forest appears after loading a save instead of running at 20 fps for one and a half to two seconds Three late frames in a row stepped the hold up to the cost of the last, and the scene's first frames after a loading screen include one or two one-off frames of 120-175 ms (the game's first scene frame, an upload burst): hold 3 at once, although no hold absorbs such a frame. At hold 3 the GPU idles between frames and the clock the loading screen left low stays low, so the scene's GPU time stayed about twice its own (19-34 ms for 12-14 ms of work) until the GPU-slowed probe 34 presents later; all that cref and the GPU reference had learned of hold 1 was the loading screen's cost, so no earlier way back fired. nvn_fstep.h: a frame above kmax + FSTEP_LATE that breaks a run of FSTEP_RUN frames on time is a one-off frame, while a step up is possible (k < kmax: not with fps_hold off), no trial is in progress (a probe has one), and not at 120 fps, where no step pays a debt back. It starts FSTEP_GRACE frames whose lateness does not step up; the grace has no trial and is not renewed (the ramp rule stays the probes'). The debt pays the late frames back. A scene that stays late steps up once the grace is over; a device too slow for every frame breaks the run on time once and reaches its hold one grace later. fstep_tick logs them (20 lines of their own) and counts them in the game-time summary. Not measured with present snapshots, whose screen verdict comes 8 presents late, so the last late frames after one may still step up there. Replay of one walk on an M4 Max, three runs each, measured with the previous revision of this commit (the same rule: since then only the name, log text, a condition implied by another and a counter's saturation changed), the 110 frames from the scene start: 31 / 31 / 31 frames of 45 ms or more, 3.08-3.14 s, before; 2 / 2 / 2, 2.17-2.18 s, GPU 15.4-15.8 ms, with the change. t_fstep, each case with the probe ramp off and on: the measured burst keeps hold 1 (it steps to 3 without the change); a scene that needs hold 2, frames all above kmax and a late scene with a spike every 30 frames still step up after one grace; none at 120 fps, with kmax equal to kmin or during a trial, and with present snapshots a second costly frame inside the grace does not renew it; each condition, removed alone, fails a check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#2091 (cocoman93); original commit(s) 90fa93e
…e, the stub's branches are computed, and a test runs it at both base rates Base 30 in the frame ratio is the framework's half rate, not a cutscene speed: bit 0 of its +0x24f is the mode and bit 1 flips each pass of its frame function, and with both set the draw and the present return at once while the calc tree runs. The game then calcs twice a drawn frame, the ratio's function among them, so each calc takes half the frame's step: step x base / 60 is right, and the step alone (PR seedds#1996) would run that mode at twice its speed. The ratio's unit is 1/60 s whatever the base (the time object's step in seconds is ratio x 1/60). The stub counted the frame's vsyncs at both calcs, so the host's game time would read twice the real time in that mode. It now counts them at the calc that is drawn. Its branch targets are computed from the words emitted instead of fixed offsets. test_oot_frame_step.py runs the emitted stub under Unicorn (optional, as test_astral_fps.py): both bases at steps 1 to 3, the count, x17 lost after a store, and the game's own division at target 0 and before a step is decided. It fails on main's stub (the count) and on PR seedds#1996's (the ratio). Co-authored-by: Zard Studios <96824937+Zard-Studios@users.noreply.github.com> Co-authored-by: dsi-hub <260802842+dsi-hub@users.noreply.github.com> Source: PR seedds#2071 (oliverames); original commit(s) 02dc1b2
…held a second vsync With fps_target 60 the pacer raises the hold above the cap's vsyncs after three late frames in a row, so a game that can almost keep 60 fps is held at 30. On a MacBook Air M4 (10-core GPU, 16 GB) at 1920x1080 docked, in the Hyrule Field view, DM_FPS_HOLD at its default against off: 30.1 -> 33.7 fps (frame p50 33.31 -> 29.38 ms); on the Kokiri bridge, about 52 fps against a steady 30. fps_hold is already off for two other profiles; the launcher's Hold frames when late turns it back on. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Source: PR seedds#1927 (FeReuss; commit authored as seedds); original commit(s) a4d50d8
…ide by side (profile key dispatch_overlap, on for Ocarina of Time): Kokiri Forest GPU p50 15.63 -> 14.76 ms Ocarina of Time runs most of its compute at the start of a frame, many dispatches back to back with no nvnCommandBufferBarrier between them. dispatch_enc put a barrier inside the shared copy encoder before every dispatch, so each one waited for the one before it. NVN orders a dispatch after earlier work only through a barrier, as the draw passes of a game with draw_barriers game are ordered. With dispatch_overlap on (DM_NVN_DISPATCH_OVERLAP overrides it), two of the game's dispatches with nothing else between them in the copy encoder and no game barrier between them run side by side. A copy, fill or inline update between them, a dispatch of the host's own, or a game barrier keeps the barrier, and whatever follows a dispatch other than another dispatch still waits for it. The key is off by default, so every other profile keeps the barriers it has. Measured with scripts/bench.py on a --platform mac build of main d8b2b64, the kokiri-deck route, docked, Apple M4 Pro, three runs a side with a warm pipeline archive: GPU p50 15.63 -> 14.76 ms, p95 16.43 -> 15.66 ms, frames over budget 63 -> 36, the pictures alike. t_dispatch_overlap checks where the barriers go. Source: PR seedds#1901 (FifteenPen); original commit(s) 5b7b307 Conflicts: dm/gfx/nvn/nvn_mtl.m, beside PR seedds#2226's ind_split (5c89588): kept both, ind_split and its counter before dispatch_overlap and dispatch_enc(int game). The two compose: an indirect dispatch that ind_split sends into a new encoder sees g_blit_ops 0 (blit_open), so it is never placed beside the dispatch before it. main added a forward declaration of dispatch_enc(void) and a host dispatch (the GPU swizzle at nvn_mtl.m 5138) after this PR's base; both now take the new argument, the swizzle as the host's own dispatch (dispatch_enc(0)). dm/games/README.md: kept the gpu_ts_hz row (PR seedds#1714) and added the dispatch_overlap row after it.
…behind the cache by the game's texture object: a view asked for through a new texture object over the same storage, or through the ID of a finalized one, is the one made before (vb_get / vb_put; an entry leaves when the host retires the Metal texture through defer_obj_at, or after 120 frames unused; textures uploaded from guest memory stay out). Ocarina of Time makes its render targets on new texture objects every frame and made 77 views a frame of 39 Metal textures that stayed, 0.9 ms of the replay thread while the GPU waits for it at each frame's start: none in three consecutive frames now, the replay's CPU 7.1-7.9 -> 6.1-6.3 ms a frame, and a GPU-bound Hyrule Field scene 52.2-53.4 -> 55.3-55.8 fps; with enc_thread on in its profile 56.5-56.9 (Apple M4 Pro, headless, three runs a side, measured on 8db5dd4). t_view_cache checks the reuse, the retire, the ageing and the uploaded textures through tex_by_id Source: PR seedds#2260 (roandegraaf; commit authored as seedds); original commit(s) 196f57e Conflicts: Ocarina of Time's game.tsv (enc_thread on next to PR seedds#1901's dispatch_overlap on) and README.md (the Found on this game list): kept every line of both.
…amp heap, which exists only without the encode thread t_feedback tests the segment timestamp heap, which exists only without the encode thread (ts_on(): seg_ts() && !rec_on()), and rec_on() defaults to the profile's enc_thread. With Ocarina of Time's enc_thread on (PR seedds#2260, 46c35fd here), three of its checks failed under GAME=0400486024DEC000. Source: PR seedds#1928 (FeReuss; commit authored as seedds); original commit(s) 858fe11, the Makefile hunk only. Its game.tsv line (enc_thread on) and README line duplicate what PR seedds#2260 already added, so they were left out.
…s written, and a submission looks at a texture's pages once: the images (a layer's level) with a page written since the last upload are read from guest memory and the others copied on the GPU from the texture it replaces (pkg_written, up_copy_add; DM_NVN_PARTIAL_UPLOAD=0 reads whole), where one written page sent every layer and level through the upload again, at every use. A write another thread makes while the queue's thread replays a submission is found at the next submission's first look (nvn_dirty_touch then, so that generation caches do not keep the texture); writes by the replaying thread (nvn_dirty_own_writes) and looks outside a submission stay exact. Ocarina of Time's loader fills a 1800x1380x8 array of 38.5 MB piece by piece while the game draws with it: on the walk into Hyrule Castle Town 31-52 re-uploads a run, the array 16-17 times whole, frames of 30-64 ms; now 16-17 re-uploads, the array 7-9 times at 4.7-14.2 MB, frames of 25 ms at most (M4 Pro, on base 8db5dd4). A texture holding copied images is read whole once an upload batch was dropped (g_up_lost_gen), and the recovery of a dropped batch is no longer skipped for a texture with edge copies (pkg_edges_clean). The DM_NVN_REUPLOADS line names what was read, the time and the submission; t_partial_upload compares every image with a CPU reference after each write Source: PR seedds#2263 (roandegraaf; commit authored as seedds); original commit(s) 213a281 Conflict: dm/gfx/tests/Makefile, the t_partial_upload rule next to PR seedds#2260's t_view_cache rule: kept both.
…e is made: pso_predict_rest_ asks pso_base_made first, hands nothing to the background for such a key and leaves it out of later candidates (g_pp_easy), instead of making a stand-in (an archive lookup of the pulling base on the submit thread) for every key it proposed, outside its budget of 2. A Metal 4 base does not depend on the depth and stencil formats, so a draw's key without those attachments, which the prediction proposes for a pass that attaches them on demand, shares the drawn key's base; it is rarely drawn, so it never entered g_pso, a prewarm list or the archive's use, and every prediction of every run proposed it again. Ocarina of Time's Hyrule Castle Town (v131072, a host on 8db5dd4, Apple M4 Pro, headless, one run a side): the route's three predictions 30.8 / 104.4 / 54.5 ms on the submit thread, one of them 160 stand-ins with 100 found archive lookups and a frame of 149 ms, → 0.5 / 2.0 / 1.4 ms; pulling pipelines made 244 → 1. t_pso_depth_stencil's prediction_made_base pins it (its prediction case takes a second library, whose keys have no base made). Open: a proposed key with no base made still gets its stand-in lookup on the submit thread; no five-game regress run (one game built on this Mac), not repeated in the game on ced3612 Source: PR seedds#2262 (roandegraaf; commit authored as seedds); original commit(s) 038492e Conflicts, docs only: Ocarina of Time's README.md (the castle town frame-rate entries and the Found on this game list), docs/agents/symptoms.md and docs/reference/frame-rate.md, next to PR seedds#2263's entries: kept both. In frame-rate.md the two new sections shared their last line (Found on), so git kept one copy; PR seedds#2263's section got its own back.
…epare after one look; the tile plan looks textures up only for attachments fb_prepare and fb_tile_plan looked up every fragment texture binding of every draw (a lock and a texture each, with a retain and release in the plan). A first pass over the bindings' serials under one lock returns for draws that sample none of the pass's attachments, and the plan takes a texture only for a binding that names one. Mac, BotW, snapshots on: about 12,020 -> 11,930 instructions a draw (11,030 with DM_NVN_FB_SNAP=0). On the depth rule (PR seedds#1917): the look names the colour attachments only, as fb_depth_rule settles the depth attachment before it; it keeps g_fb_dwrote, and a draw the depth rule gave a copy takes the long way. The instruction counts are from before the depth rule and were not measured again. Source: PR seedds#1469 (Xipzer); original commit(s) d7a451f
wake() signalled the woken thread's condition while the waker held G, so the woken thread woke into G still held and slept again on it (_pthread_mutex_firstfit_lock_slow under its cond_wait: 5-7% of Breath of the Wild's main thread on the Mac). wake() now lists the thread (up to 8 per waker) and g_unlock signals it after the unlock; a thread that waits on a condition with G signals its list first, and thr_free waits out a signal in flight. BotW, Mac, three A/B pairs: lock slow path 51-70 -> 18 samples, guest threads 503-512 -> 494-498 ms/s of CPU (main thread 112-114 -> 108-110), CPU energy 1.21 -> 1.18 W. DM_WAKE_UNLOCKED=0 restores the old order. Source: PR seedds#1466 (Xipzer); original commit(s) 2f1f48d Conflict: dm/host/hle_thread.c, SleepThread's handoff exit, where main has since added the poll sleep: kept main's lines and gave them this change's g_unlock() in place of pthread_mutex_unlock(&G). Checked after the merge: every other unlock of G in the file is g_unlock() (the one pthread_mutex_unlock(&G) left is inside g_unlock), and the waits on G are those this change already covers (wake_flush() before each, or a thread that has not started yet).
Squashed from: - 363f17d Add opt-in graphics quality tier override - 7821a8c Register graphics tier diagnostic environment switch Source: PR seedds#1838 (northbridgeforge); original commit(s) 363f17d 7821a8c
…en that can show EDR, the game's HDR10 window goes as it is into an RGB10A2 BT.2100 PQ layer, and the peak follows the screen's current headroom with no HDR10 metadata on the layer, on the Mac and iOS - hle_vi.c: with DM_HDR=1 (the HDR output row, on by default) vi::QueryDisplayHdrStatus answers HDR on, format 1, while the window's screen can show EDR (DM_HDR=2: on any screen), and the game asks every frame, so its window follows the screen; the iOS in-game menu turns it on and off while the game runs. The paper white (DM_HDR_PAPER_WHITE, the HDR paper white row) is 100 nits by default, the screen's own white: macOS shows a PQ layer at EDR = nits / 100, measured with an extended-range screen capture, so the game's normal picture matches SDR and the headroom is left to its highlights (by eye, Mario Kart World at 100 had SDR's base brightness with brighter highlights; at 203 the whole picture was brighter). - The peak (DM_HDR_PEAK, the HDR peak row) is automatic by default: 100 nits times the screen's current headroom (front_hdr_headroom: NSScreen's maximumExtendedDynamicRangeColorComponentValue on the Mac, UIScreen's currentEDRHeadroom on iOS), in steps of about 6 % taken once they have held for a second, at least twice the paper white, so the game tone-maps into what the screen shows. Donkey Kong Bananza and Ocarina of Time declare within the peak they are told, and all three games' pixels stay within it. - No HDR10 metadata on the layer (DM_HDR_META=1 adds it): with metadata above 100 x headroom Core Animation compresses the whole picture, mid-tones included (measured), and Mario Kart World declares about 1.8 times the peak it is told; and in fullscreen a layer with metadata of any range showed rectangles of older frames under GPU load, in the host and in a standalone app with no game, judged by eye without knowing the mode (dm/gfx/tools/hdr_rects.mm), none without. A fixed peak above the screen's is rolled off in the present above three quarters of the screen's held peak (present.metal mode 4), keyed on the smaller of the declared range and the peak told. - present.metal and nvn_mtl.m present_mode: the HDR10 window as it is into the PQ layer, an SDR or float source encoded at the paper white while the status answers HDR and at 100 nits, the screen's SDR white, while it answers SDR (at 203 an SDR screen showed the SDR picture twice as bright and clipped), an HDR frame brought to SDR white with its hue for screenshots and SDR drawables; RGB10A2 windows are PQ only once the status has answered HDR. A PQ layer rather than an extended-range float one, which showed black blocks over flat areas on a MacBook Air M5 while the game's frames were clean. - With metadata in fullscreen (DM_PRESENT_AFTER_GPU), the drawable is handed to the system once its present pass has completed, without signalDrawable, which with the pass completed made frames a refresh late; it costs frames a refresh late when the pass ends close to the refresh, so it is off without metadata and in a window. - dm/gfx/tools/edr_probe.m measures how macOS maps a PQ layer into EDR; dm/gfx/tools/hdr_rects.mm reproduces the rectangles with no game. - t_present_hdr: the status answer, the automatic peak and its hold, the PQ decode and encode, the roll-off's curve, SDR and float sources, screenshots; test_settings: the rows and their per-platform defaults. - Notes: Donkey Kong Bananza, Mario Kart World and Ocarina of Time's HDR windows and what each declares; three reference entries in docs/reference/rendering.md. The PQ layer is beecrepaldi-afk's (maxdavidson#1), the present after the GPU and the standalone app that found the rectangles b1tdr3amer24's (#2), the paper white and peak rows and the automatic peak's front end hook Amost's (#3). Front-ends: new: HDR output for Switch 2 games (DM_HDR, DM_HDR_PAPER_WHITE, DM_HDR_PEAK rows): the front end makes the HDR layer RGB10A2 in kCGColorSpaceITUR_2100_PQ with wantsExtendedDynamicRangeContent (front_mac.m, front_ios.m) Front-ends: new: the HDR output row defaults to on; the host's own default, DM_HDR unset, stays SDR, so a front end that does not pass the row's value starts the game in SDR Front-ends: new: front_hdr_screen() (the window's screen can show EDR) and front_hdr_headroom() (its current EDR headroom) are weak hooks in hle_vi.c; without front_hdr_headroom the automatic peak answers 1000 and nothing is rolled off Front-ends: new: a front end calls dm_hdr_layer_meta_set() with whether it gave the layer HDR10 metadata, and receives the game's declared range through front_hdr_content_range() for that metadata Co-authored-by: beecrepaldi-afk <beecrepaldi@gmail.com> Co-authored-by: b1tdr3amer24 <240231594+b1tdr3amer24@users.noreply.github.com> Co-authored-by: Amost <6445689+Amost-@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#1176 (maxdavidson; squashed and pushed as seedds); original commit(s) cf2ca59
…in on this branch PR seedds#1176 (80a2593 here) turns the launcher's HDR output row on by default. The picture options taken on this branch are all opt-in, so the row now starts off, as the host's own default (DM_HDR unset) already was; turning the row on behaves exactly as in the PR. settings.tsv, the row's check in test_settings.py, its env_switches.tsv entry and docs/settings.md say off.
… of Time), and an upscaler that writes its result squared takes square-rooted colour Ocarina of Time (Switch 2) upscales 1536x864 to 2048x1152 with agl_ndsr_vr.pck's network (f8965bffbdf51d78 and others). game.py listed only agl_ndsr.pck's shaders, so the MetalFX option left it running; listed, its variants were refused, as their code holds no sRGB curve (R11G11B10F in and out). A variant with no curve constant and no MUFU.EX2 / MUFU.LG2 (which every curve takes, wherever its constants come from) neither encodes nor decodes, and is drawn as the linear shape, which converts nothing either. With MetalFX in its place, the dotted horizontal lines the network's output showed in fog and light shafts are gone. Tests: t_upscaler_mfx (Bananza's and Splatoon Raiders' profiles, game and metalfx, both encoding modes): no curve and no power -> one colour space; a power with no curve constant -> the shader runs; a MUFU that is no power does not count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from (the PR's commits, without its merge of main): - ddeae47 DM_UPSCALER=metalfx takes agl's agl_ndsr_vr.pck networks too, and a variant with no curve and no power is drawn as one colour space: Ocarina of Time's upscaler is MetalFX's - 6fbf53f The upscaler entry says what the change does on Ocarina of Time: the MetalFX option draws its agl_ndsr_vr.pck upscale (main's dead-code fix removed the dotted lines at their source) - d715366 An upscaler that writes its result squared (x * |x|) takes square-rooted colour: MetalFX gets its input squared into linear colour, and the picture is no longer washed out - 13e297b test_game_profile: an agl_ndsr_vr_light.pck row in the shader map fixture, so the VR packs' upscaler keys stay covered (Ocarina of Time's fa3033d05c0a41d6) Source: PR seedds#1459 (PromethOps; commits authored as seedds); original commit(s) ddeae47 6fbf53f d715366 13e297b, head 79fbc06. Applied as the PR's net change against the main it last merged (08c27ed), which applied cleanly here.
A covered Mac window (other windows over it, minimized, another Space) dropped to about 3 fps: Star Fox had 333 ms frames while the player typed in another app. macOS fires a covered window's display link about once a second, so each acquire waited out link_wait's timeout and then mtl_present_wait's stall fallback, and every rare tick ended the stall so the next frames waited again. The silent-link rescue did not apply, since the game is usually out of focus then. DM_PRESENT_LINK=0 avoided it. The Mac front end now keeps the window's occlusion state (front_window_covered, from the occlusion notification and read once a second after the window opens). While it is covered, link_sync runs mode 0 as a rescue does: the link is invalidated, the present thread takes its own drawables and the acquire waits for the host's clock at the present interval. Visible again, the requested mode returns with a fresh stall clock; the link's silence while covered is no stall and triggers no rescue. The frame step, targets and on-screen pacing are unchanged; focus (DM_FOCUS_KEEP) is untouched. Checked: t_present_rescue's new covered cases (91 checks), make -C dm/gfx/tests and dm/host/tests GAME=040074A01BF12000 run. No game run with the change yet. Source: PR seedds#1302 (lunks); original commit(s) b11cbb8 Conflicts, tests only: dm/gfx/tests/t_present_rescue.m runs covered() next to main's newer vrr120(), and t_present_rescue_focus.c keeps main's front_screen_max_fps / front_screen_match stubs beside this change's front_window_covered stub.
DM_SHOW_FPS=1 was read only by the iPhone front end. front_mac.m now shows the same counter at the window's top left: the frames put on screen in the last second (mtl_present_count), the longest time between two presents in that second (a freeze shows there, not in the rate), and the mean GPU time of the frames completed in it. nvn_mtl.m's new mtl_frame_stats gives the last two (the present gap kept with an atomic max in present_now; the GPU time from the frame ring, 8 frames behind as the timing line takes it). Window > Frame-Rate Counter turns it on and off while the game runs. The NSP script's Mac run command sets DM_SHOW_FPS=1 unless --no-show-fps (SHOW_FPS, on by default), and a Mac app's settings window now lists the Frame-rate counter row (settings.tsv: always instead of platform:ios), its default from the same setting. test_launcher_settings.py's test_iphone_switches_only_on_the_iphone encoded the counter as iPhone-only; it is updated deliberately: DM_SHOW_FPS is now on both platforms, touch feedback and the picture fit stay the iPhone's. Source: kid-with-sword fork (cheemu21/kid-with-sword-remake), commit 72275f7 authored as seedds ("OoT1 B-1", never on seedds/nxnative main); no upstream PR. Conflict: dm/games/settings.tsv, where PR seedds#1176's HDR rows now sit above the counter's row: kept them, and the counter row with this change's platform column (always instead of platform:ios).
… deadlocks against the zstd command's pipes Feeding the zstd CLI through stdin while capturing stdout deadlocks on macOS once a frame is larger than the pipe buffers: the worker's blocking write waits for zstd to read, while zstd's output writer waits for the worker to drain stdout. Ocarina of Time's sound archives hit it at 88% of the split (164,256 of 186,587 files), and the build hung for good. compression.zstd (Python 3.14, backports.zstd before) is already used for dictionary frames; it decompresses frames without one too. test_split_zstd.py covers files and bounded RomFS entries. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Source: PR seedds#1463 (jonpage0); original commit(s) 82a24a4
…m the way to Kakariko Village and from Kakariko between day and night Squashed from betogzo's two commits: - 449eebb: Ocarina of Time's prewarm list gets 11 more task / mesh pipelines from the way to Kakariko Village: on a build with a new chain they were built at their first draw there, up to 1.7 s each Taken as they are from a MacBook Air M4's pso_user.tsv after play from Castle Town through Hyrule Field to Kakariko Village (build a74098c): its M rows that pso_manifest.tsv lacked, 10 behind the task shader a5288d0a6c4971fd_b and 1 behind efaa4fa6a80ba719_b. Seven of the session's pipelines stalled at their first draw (4.4 s in all; mesh acf47e2515a2aad1 1,508 ms, 1e1dcd39c29f2e7a 227, 1515d800ca824dec 210, 0a5184bfc0ebe4dc 196, 066f5daf12e43c71 43, and 321a5382ac85e119 / 65d281ec666939bc, which upstream's 41 rows of dbf8499 hold). 175 M rows in all. - 78e241c: Ocarina of Time's prewarm list gets 7 more task / mesh pipelines from Kakariko Village between day and night: built at their first draw there they took 0.28-1.55 s each From the MacBook Air M4's pso_user.tsv after a session in Kakariko Village on build 449eebb (chain 8f2d8a09c3f9), all 7 behind the task shader a5288d0a6c4971fd_b: mesh 68d5404d3bcff8b3 1,553 ms, e5d7cd51f02e07ee 1,457, 6218f01c6a85975e 1,445, 65d281ec666939bc (another fragment shader than the listed one) 533, 7f688222e651d8d3 316, 2297f4e480502799 285, 187760e0de3b78ee 281. 182 M rows in all. Source: betogzo/nxnative branch ocarina-of-time-mac, commits 449eebb and 78e241c (betogzo); no upstream PR. Both applied cleanly here (append-only rows); the manifest has no duplicate rows after them.
…me's ocarina could not hear the player, because the host listed no virtual input device and the game skipped its input streams; the host now lists one, fed from the default input device - hle_audio.c lists one virtual input device (AudioVirtualInput) and names the raw one (AudioTrueRawInput). One AudioQueue captures the default input device at 48 kHz mono PCM16 while any stream is started and copies into each started stream's ring; a full ring keeps the newest frames. Reads convert to the stream's format (PCM16 or float, 1 or 2 channels) and apply its gain. Other rates fail the open with a [RED] line. Nothing in it is specific to one game - The capture follows the input device chosen in macOS: the host listens for the default input device changing and for its queue stopping by itself (a device that went away), and recreates the queue on the current default, on a serial dispatch queue of its own. The streams keep their states and rings across a switch - A Bluetooth input that is also the output is not captured: with AirPods Pro as both, capturing their microphone switched them to the call profile, and the game's sound dropped to call quality while the ocarina was out (log: "microphone: capturing ... AirPods Pro", then "audio device buffer ... after output changed"). When the default input is a Bluetooth or Bluetooth LE device and the default output is the same device or has the same Bluetooth address (the UID before its ':'), the capture takes the built-in microphone (transport BuiltIn, set as the queue's current device); a Mac without one captures nothing and logs one line saying why. The host also listens for the default output device changing, since the choice depends on it - DM_MIC=0 lists no device, the old behaviour. It is on by default where real audio output is on (DM_AUDIO=1, which the Mac launcher sets), so silent-sink runs (tests, replays) never open the microphone or ask for it, and off on iOS, whose audio session and Info.plist do not ask for it yet - DM_MIC_WAV=<file> feeds a 48 kHz 16-bit WAV in place of the device, and DM_MIC_DUMP=<file.wav> writes what each read returns, for headless checks of a game's microphone use - The packed Mac app's Info.plist has NSMicrophoneUsageDescription; the host and the audio unit tests link CoreAudio (the HAL device APIs, Mac only) - t_input_stream checks the bookkeeping with a fake capture: listing, opens as the game does, a 44.1 kHz open refused, the capture starting once for two streams and stopping with the last, reads in order, gain, a full ring, purge, float stereo with an event, close, device changes with and without started streams, a failed restart, the WAV feed and the dump, and the device choice for Bluetooth inputs (one device or an input/output pair with one address, Bluetooth LE, no built-in microphone, other outputs, a USB headset) - docs/reference/audio.md's entry becomes "Virtual audio input devices: the Mac's microphone (SDK 21 / 22)", with the symptom index regenerated; Ocarina of Time's note has a Microphone section Ocarina of Time starts its streams only when its own option Ocarina Mic Input is Instruments or Humming (None by default). Headless with DM_MIC_WAV feeding Zelda's Lullaby as hummed tones, the game read every sample (DM_MIC_DUMP matched the file) and its pitch library returned 494, 587 and 440 Hz for B, D and A. Hummed notes do not make Link play single notes in free play: the game's free-play mic handler returns outside its modes 0 and 2, so that is its design, not a host gap. A hummed song being accepted needs a save with a learned song and was not checked. Checked on an M5 Pro, macOS 27: make -C dm/host/tests GAME=0400486024DEC000 run (t_input_stream and the audio tests that include hle_audio.c pass); test_docs, test_env_switches, test_nsp_mac_app, test_launcher_settings, test_bug_report, test_lint_c, test_architecture; lint_c.py tidy with LLVM 23.1.4 shows no new finding in the changed files (one analyzer false positive on the read loop carries a NOLINT with its reason). The device choice was run against this Mac's real devices (HAL queries only, no capture): with the built-in microphone as default input it keeps it. The AirPods case was checked only through the unit test, not on the AirPods. Front-ends: new: a front end whose own app starts the host is the app macOS asks for microphone access when a game starts an input stream, so its Info.plist needs NSMicrophoneUsageDescription; DM_MIC=0 keeps the microphone closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#1908 (santissimoo); original commit(s) 382c1fc
…carina's camera drifting left) Source: Fasen24-AI/swordboiMacNative branch ocarina-mac, commit 82ab1be (EmmanueleC); no upstream PR. Conflict: Ocarina of Time's README.md (Found on this game list), where that fork's list differs from this branch's: kept this branch's list and added only this change's line (Switch Pro Controller advertises motion but sends zeroes).
… the Wild: the six-axis sensor is a 200 Hz stream per handle (each entry the one before moved on 5 ms at the source's rate, never changed once the game may have read it) instead of the newest sample in every entry, a Switch 2 controller's stick dead zone is a tenth of its travel scaled from its edge (a released right stick no longer reads 3 to 5 %), the Pro Controller 2 takes the Joy-Con 2 pair's axes, and a pad waiting for its first press stays connected; scripts/sw2_gyro.sh shows a Switch 2 controller's motion without a game (issue seedds#2245) DM_MOTION_STREAM=0 gives back the newest sample in every entry, DM_SW2_DEADZONE sets the dead zone. Breath of the Wild 1.9.0 takes its entries by sampling number (main+0x10ff21c) and decides at the start of an aim whether the right stick is in use; with a Pro Controller 2 reporting every 30 ms on a Mac it saw one change and then equal entries, a prediction and then the measurement that replaced it (flicker), and a stick at rest 40 to 60 counts off its centre. Front-ends: interface: dm_switch2_front.attach (pad_switch2_apple.h) returns int: 0 when every player is taken; a pad left without a player until its first press (DM_PAD_PRESS_TO_JOIN) returns 1 and stays connected Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#2258 (JulesLePrince; commit authored as seedds); original commit(s) 2432e77
…t's heap), max hearts and infinite health, Link speed, one-hit kill and no damage Squashed from: - Ocarina of Time: GBAtemp's infinite rupees and ammo cheats, moved to this host's heap Six codes rainbowkittypaw posted on GBAtemp on 2026-11-06 for the Lichii emulator (post 10942642 in "Cheat Codes AMS and Sx Os, Add and Request"): Infinite Rupees, Deku Nuts, Deku Sticks, Seeds, Bombs and Bombchus, each a heap store of 9999 into one of the game's s32 game-data flags. This host keeps that table 0x2000 bytes higher in the heap than Lichii does, so the posted addresses change nothing here. The source (OcarinaOfTime.cheats.toml, build E0F3CCFAF50065AE only) adds 0x2000 and writes only while the flag's hash is in its table slot. The README's Cheats section has the table's layout and the test; the cheats reference notes that heap codes can differ between hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - Ocarina of Time: max hearts and infinite health cheats from the same game-data table Two entries found here from the game-data table the GBAtemp codes use, not from the post: current health is flag 31ab5580 (index 963) and max health fbe01da1 (964), both in quarter hearts (12 on a new file). "20 heart containers" sets max health to 80; "Infinite health" copies max health into current health every pass (opcode 5 into r1, opcode A stores it). Both are gated on the two flags' hash slots, like the six codes, and compile only for build E0F3CCFAF50065AE. Tested headless: 20 full hearts on the HUD with both on; damage not tested. The game README's Cheats section has the flags and the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - Ocarina of Time: Link speed x1.5 / x2 / x3, one-hit kill and no damage to Link, code patches for build E0F3CCFAF50065AE; "Infinite health" goes, as flag 963 is only the copy the game makes of Link's life Speed: the three branches that hand the player a new speed (main+0x934990 walk / run, +0x933E30 / +0x933E74 rolls, into main+0x9352F0) go through a per-factor stub in the padding after the text; the sites are the ones afiaka87's oots2-release faster-movement-extra doubles (MIT). Damage: the routine's sub at main+0x49DCDC goes to one stub with two switch words in unused .bss: a plain life holder (enemies) goes to 0 on any damage, a game-data holder (Link's) keeps its life. Compiled with cheat_anchor.py, all 17 entries with code give the words of the tested file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#1718 (Amost-); original commit(s) 9aa0b0d 941c799 0a244b0
…ooks, game controls held while it is on), by UserDerezzed Squashed from: - 23dd8cf: Ocarina of Time: a free camera cheat. The left stick flies along the view, the right stick turns and tilts, ZR / ZL rise and sink; while it is on, the game's five GetNpadStates calls go through wrappers that clear buttons and sticks, so both sticks belong to the camera (Mac only, build E0F3CCFAF50065AE) - 91ca585: Ocarina of Time's free camera (by UserDerezzed) reads the sticks as amounts: the controller wrappers keep player 1's sticks as floats in the unused end of .bss, so speed follows the push (deadzone 1/8, squared), R held is 4 times as fast, tilting moves at a steady rate and stops at about 75 degrees, and flight speed is the same at any tilt Source: PR seedds#1949 (UserDerezzed); original commit(s) 23dd8cf 91ca585, head 33f14be (its merge of main left out). Conflicts with PR seedds#1718 (e2ba44a here), which created the same cheats file and the same README section: OcarinaOfTime.cheats.toml keeps one format/title/authored header, seedds#1718's header comment followed by the free camera's, seedds#1718's 21 entries and then the PR head's three free camera entries byte for byte. The two use different code caves in the text's padding (seedds#1718 main+0x3C46400..0x3C4647C, the free camera main+0x3C46C00..0x3C46E68), different .bss words (seedds#1718 main+0x4E9FE20 / 0x4E9FE24, the free camera main+0x4E9FF00) and different hook sites. README.md: seedds#1718's Cheats text, then the PR head's free camera text, its first sentence starting "The file also holds a free camera".
…main+0x488750) branches to a cave that returns when the receiver's handler is Link's, so Link loses no hearts and does not die while enemies still take damage (Mac only, build E0F3CCFAF50065AE) Source: PR seedds#1955 (UserDerezzed); original commit(s) e893abd, head deaa85f (its merge of main left out). Conflicts with PRs seedds#1718 and seedds#1949 (same cheats file and README section): the god mode's header comment joins the file's header, its two entries go after the free camera's byte for byte, and its code anchor s_488750 joins the anchors at the end. Its [anchors.cave] (pad 0x100, authored 0x3C46F00) is not added again: the free camera's cave anchor (pad 0x400, authored 0x3C46C00) already covers it, the cave being one block from its lowest base to the read-only data (cheat_anchor.py's import sets it to the lowest base the file writes), and a TOML table cannot be declared twice. Caves and hooks do not overlap: seedds#1718 main+0x3C46400..0x3C4647C, the free camera 0x3C46C00..0x3C46E68, the god mode 0x3C46F00..0x3C46F27; the god mode hooks main+0x488750, which neither of the others patches. README.md: the god mode's text after the free camera's, starting "The file also holds a god mode".
…ps), and cheat_anchor.py's once = true for a code entry Squashed from the PR's commits (its merge of main left out): - e518b7a: Ocarina of Time: a map select by UserDerezzed. 48 warps, one per area the loading zones reach: with one on, the next area change the game starts is sent to that area through a real entrance's start position and arrival event, once (data only, build E0F3CCFAF50065AE) - dd816bf: Ocarina of Time's map select (by UserDerezzed) warps without a door: an Instant warp switch hooks the Main sequence's update to a cave that asks the event manager for Dm_SY_BancChangeGo with the location's area, start position and arrival event, as a loading zone does, on ZL+ZR+Down; the 48 locations do both, and the separate instant list is gone - b8ec25b: Ocarina of Time's map select note: warps into areas the story had not reached and into dungeons from outside worked in play - 0e17579: cheat_anchor.py: a code entry with once = true is applied once (the meta's once column, the panel's Apply), as action = "set" marks a data cheat; once on another entry, on a master or with a non-boolean value is refused - a42f893: Ocarina of Time's map select (by UserDerezzed) is one click: 48 Warp now rows in child, adult and dungeon sections, each applied once (once = true, the panel's Apply), write their area's strings, the warp cave and its hook, then the flag, so the game warps as from a loading zone and the row turns itself off; the door redirect and the Instant warp switch with ZL+ZR+Down are gone - c95a230: Ocarina of Time's game note: the map select's test line names no button combination, which the one-click rows do not have Source: PR seedds#1963 (UserDerezzed, a draft); head c95a230. It carries PR seedds#2023's change (cheat_anchor.py once = true, 0e17579, the same as seedds#2023's 5dd59f2), which its one-click rows need. Applied as the PR's net change against its merge base (8d5d4f1) for scripts/cheat_anchor.py, its test and docs/development.md (clean). Conflicts with PRs seedds#1718, seedds#1949 and seedds#1955 (same cheats file and README section): the map select's header comment joins the file's header and its 48 entries go after the god mode's, byte for byte, before the anchors (it has none of its own). Its cave (main+0x3C46E70..0x3C46EFF, 0x3C46F28..0x3C46FBB) was written around the god mode's (0x3C46F00..0x3C46F27) and above the free camera's (up to 0x3C46E68); its .bss words (main+0x4E9FF20..0x4E9FFBF) are above the free camera's sticks (0x4E9FF00..0x4E9FF0F) and seedds#1718's switch words (0x4E9FE20 / 0x4E9FE24); its hook (main+0x3303CA0) is patched by no other entry. README.md: the PR adds a Cheats section of its own; its text goes into this branch's Cheats section after the god mode's, starting "The file also holds a map select".
… a disclosure row with its name and how many cheats it has and how many are on, a click folds or opens it, a section of more than 10 rows starts folded, the choice is kept per build in user defaults (DmCheatsPanel.folded.<build ID>), and a search shows the matches inside folded sections; the Cheats menu puts each section's cheats in a submenu titled with its name Source: PR seedds#2014 (UserDerezzed); original commit(s) dc535ba
…e so that every slot loads Link at one place (the stage in Sequence_CurrentBanc, the position in PlayerStatus.SavePos, the facing in PlayerStatus.SavePosRadY; no checksum), with presets for Hyrule Field, Death Mountain and Zora's Domain as child and adult and the temples' warp pads, for scripts/bench.py --save; format work after Traiver's OOT-SW2SE save editor (MIT) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#2002 (Amost-); original commit(s) 08bd260 Conflict: Ocarina of Time's README.md, where the Cheats section (PRs seedds#1718, seedds#1949, seedds#1955, seedds#1963) now stands where this PR adds its Test saves section: kept the Cheats section and put Test saves after it.
…batch: Ocarina of Time's whole Mac map, built cold on an M5 Max with 18 cores, takes 1,298 s instead of 3,002 Each shader needs about 40 ms of dmsh_build.py's own Python, which one process runs one shader at a time under the GIL, so the cores were half idle whatever J was. A build now runs as DMSH_PROCS copies of itself (default J / 3), each building a share of a phase and staging its outputs in the same cache; the build that started them writes the library as before. Within a process the misses are translated in chunks of 8, largest first, and each shader is finished as soon as its chunk is translated, instead of every worker waiting for its batch's slowest shader. The outputs are byte-identical (all 173,316 files of the whole map, apart from the chain version); the chain version changes once. Source: PR seedds#2035 (Know-It-All-Brother); original commit(s) 73320a2 Conflicts: dm/gfx/nvn/dmsh_chain.h, regenerated with dmsh_chain.py --header for this tree (83ebf662a7a3; the PR's own value a2727a3090bc was for its older base); Ocarina of Time's README.md (Found on this game list): kept every entry. dmsh_build.py merged without a conflict onto main's newer version.
…op guard), with the counter only in a function that has a loop Squashed from: - d4bdfad (uncraftablexd): Every shader loop also ends after 2^18 iterations of its function (loop guard): a loop whose end never comes no longer hangs the GPU. Kirby Air Riders' particle simulation hung it about a minute into a race, 2 sessions of 2; none in 16 sessions after. The runaway loop itself is open Originally part of seedds#1275 (closed), which also had BarrierExits.cs; that pass is left out, as docs/reference/shaders.md (Compute threads that return before a barrier) explains. The loop guard is a defence: it hides the runaway, whose cause on Kirby Air Riders is still to be found. - 89d49fc (FifteenPen): Loop guard: the counter only in a function with a loop, declared alone on its line, so a task or mesh kernel's stage memory stays where dmsh_meshstage finds it Source: PR seedds#2254 (FifteenPen); original commit(s) d4bdfad (uncraftablexd) 89d49fc (FifteenPen) Conflict: dm/gfx/nvn/dmsh_chain.h, regenerated with dmsh_chain.py --header for this tree after each of the two commits (0abebf56ef4f after both; the PR's values were for its own base). Co-authored-by: FifteenPen <354289956+FifteenPen@users.noreply.github.com>
… texel inside: Metal returns 0 there on an M4 Max, and The Legend of Zelda: Ocarina of Time's ground mist, which reads its scene depth past the edge by its own arithmetic, no longer has a hard straight edge at the picture's margins (chain 4cf3b75090ba) The mist shader projects each sample to the screen and fetches the half-resolution depth at uv * 768 with uv not clamped; Metal's 0 is the near plane, so a sample just past the edge counted as hidden. Switch 2 footage of the same area shows no edge. Images, arrays, 3D and multisampled textures, the 1D fetches the translator reads as 2D rows and nested reads keep Metal's result. Which value the console returns there stays open (docs/reference/shaders.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Source: PR seedds#1824 (cocoman93); original commit(s) ccd307b. The chain named in the subject (4cf3b75090ba) is the PR's; this branch's chain after it is 6496351be585. Hand merge: main has since moved the builder's MSL rewrites and reflection out of dmsh_build.py into dmsh_rewrite.py and dmsh_reflect.py (80fc2ec), so a textual merge would have brought back about 30 functions main had moved. dmsh_build.py is main's (after PR seedds#2035 and seedds#2254 here) with this change put in by hand: fetch_clamp and fetch1d_names as the PR wrote them, before geometry_finish, fetch1d_names reading decode_tex from dmsh_reflect; in geometry_finish the stage's MSL goes through fetch_clamp after main's select_guards and PR seedds#2254's loop_guard and before pool_arrays (the PR: after precise, before pool_arrays), with the res.json read moved ahead of it; in finish fetch_clamp runs after mul_extended and before gather_offsets, as in the PR, and the later res.json read it replaces is gone, as in the PR. test_dmsh_fetch_clamp.py gives its isolated functions dmsh_reflect for decode_tex (9 tests pass). dmsh_chain.h regenerated with dmsh_chain.py --header (6496351be585).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes and extras from other nxnative forks and from open upstream pull requests, gathered for The Legend of Zelda: Ocarina of Time (Switch 2,
0400486024DEC000, update v131072) on a Mac. One commit per pick, original authors kept (cherry-picks, or--authorfor a squash or a hand port); each commit message ends with aSource:line naming the PR or fork commit it came from. Two commits on top are mine and say why.Nothing here changes
mainof seedds/nxnative; this PR is only into this fork'smain.Picks
gpu_ts_hzgpu_ts_hz 31250000game.pyand Ocarina'sgame.tsv: the PR also carried thegpu_timestampskey, which main has since removed; kept onlygpu_ts_hzhle_nvn.c/nvn_fstep.h, seedds#2071patches.py: no overlap, both behaviours kept)fps_hold offfor Ocarinadispatch_overlapnvn_mtl.mnext to seedds#2226'sind_split: kept both (they compose: an indirect dispatch thatind_splitsends into a new encoder seesg_blit_ops0, so it is never placed beside the one before). Main had since added a forward declaration ofdispatch_enc(void)and a host dispatch (the GPU swizzle); both now take the new argument, the swizzle as the host's own (dispatch_enc(0)). Games table: both rows keptenc_thread ongame.tsvand note: kept every linet_feedbackwith the encode thread offt_feedbackfailed under Ocarina's profile onceenc_threadis onenc_thread online and note duplicate seedds#2260'sdm/gfx/tests/Makefilenext to seedds#2260's rule: kept bothsymptoms.md,frame-rate.md), kept both; the two newframe-rate.mdsections shared their last line, so seedds#2263's got its own Found on line backfb_prepareearly outfb_prepareend: the early return does what the full path does when nothing is sampled)hle_thread.c, SleepThread's handoff exit where main added the poll sleep: main's lines withg_unlock(). Checked: every other unlock of G isg_unlock()and every wait on G is coveredDM_GRAPHICS_SCALE(opt-in)DM_GRAPHICS_SCALE=0draws Ocarina's full 2560x1440 docked outputDM_UPSCALER=metalfxnow takes Ocarina'sagl_ndsr_vr.pcknetworkscovered()runs next to main's newervrr120(); the focus stub file keeps main's stubs and adds this oneDM_SHOW_FPS=1/ Window > Frame-Rate Counter on the Mac (fps, longest present gap, GPU time)settings.tsv: kept seedds#1176's HDR rows and the counter row withalwayszstd)pso_manifest.tsv.bsswords and hooks checked for overlap: none[anchors.cave](pad 0x100 at 0x3C46F00) not declared twice, the free camera's cave anchor (pad 0x400 at 0x3C46C00) already covers it (one cave block from its lowest base). No overlaponce = trueincheat_anchor.pyscripts/ocarina_test_save.pycopies a save so every slot loads Link at a chosen placedmsh_chain.hregenerated; note list kept;dmsh_build.pymerged without a conflictdmsh_chain.hregenerated; the PR's two commits squashed (Co-authored-by FifteenPen)dmsh_rewrite.py/dmsh_reflect.pysince the PR, and a textual merge brought back about 30 moved functions. Main'sdmsh_build.pywithfetch_clampandfetch1d_namesadded as written (decode_tex fromdmsh_reflect), at the PR's two call sites; its test getsdmsh_reflect.dmsh_chain.hregeneratedMy two commits:
DM_NVN_IND_SPLITbut did not list it indocs/env_switches.tsv, sotest_env_switches.pyfailed; row added (written byenv_switches.py, meaning by hand).settings.tsv,test_settings.py,env_switches.tsvanddocs/settings.mdupdated.Skipped
DM_NVN_ALLOC_CAP)Not taken, as asked: seedds#2259, seedds#1996, seedds#1662, seedds#1822, the button-prompt images (betogzo, seedds#2025). Nothing taken from GPL sources (Lichii): seedds#1718's codes are a GBAtemp user's addresses and values, and its speed sites follow an MIT project.
Shader chain
dm/gfx/nvn/dmsh_chain.hafter the batch:6496351be585(was0aa68e19c9a7on this fork'smain). Regenerated withdmsh_chain.py --headerafter each of seedds#2035 (83ebf662a7a3), seedds#2254 (0abebf56ef4f) and seedds#1824, so every commit is consistent;test_nsp_chain.pypasses at the head. This needs a full shader rebuild of the game.Tests
Run on an M5 Pro (macOS 27.2) beside a running game build, with
nice -n 10. Not run: the full game or shader build, the whole Metal graphics test list,regress.py.All exit codes are the command's own.
gfxisnice -n 10 make -C dm/gfx/tests GAME=0400486024DEC000 -j4 <targets>,host testsisnice -n 10 make -C dm/host/tests GAME=0400486024DEC000 -j4 run,dmhostisnice -n 10 make -C dm/host GAME=0400486024DEC000 -j4 dmhost, and a Python file ispython -m unittest <file>withDM_GAME=010015100B514000.check_t_timestamp check_t_dirty_race check_t_nvntest_docs.py,test_game_profile.pytest_env_switches.pyDM_NVN_IND_SPLITunlisted), 0 after 351a992check_t_fstep(92 checks)test_oot_frame_step.py(5 tests run, withunicorn),test_patches.py,test_docs.py,test_game_profile.py,test_env_switches.pycheck_t_dispatch_overlap(right after seedds#1901)check_t_nvn check_t_view_cache check_t_partial_upload check_t_pso_depth_stencil check_t_direct_upload check_t_dirty_race check_t_dispatch_overlap check_t_feedbacktest_docs.py,test_game_profile.py,test_env_switches.py,test_patches.py,test_oot_frame_step.pycheck_t_present_hdr check_t_upscaler_mfx check_t_nvntest_settings.py(with dd8dbf1),test_game_profile.py,test_docs.py,test_env_switches.pycheck_t_present_rescue(112 checks); dmhosttest_split_zstd.py,test_launcher_settings.py,test_settings.py,test_nsp_mac_app.py,test_docs.py,test_env_switches.py,test_game_profile.pyt_input_stream,t_motion_pro,t_switch2among them); dmhosttest_cheat_anchor.py,test_ocarina_test_save.py,test_launcher_settings.py,test_settings.py,test_nsp_mac_app.py,test_docs.py,test_env_switches.py,test_game_profile.pytest_nsp_chain.pybefore the batch;test_shader_toolchain_cache.pyafter seedds#2035;test_dmsh_fetch_clamp.py(9 tests)check_t_fetch_clamp(23 checks); dmhostdm/tools/tests,dm/ios/testsanddm/gfx/teststest_*.py, onepython -m unittestper file as CI runs them, in a venv with.github/requirements/tools.txtandunicorntest_dmsh_pool_arrays.py(KeyError: 'cbufs'), fails the same way on this fork'smain(0cad950): 176 of 177 files thereNot run:
lint_python.py(ruff, pyright),lint_c.py, the sanitizer targets, the rest of the Metal graphics run list, the iOS compile,regress.py, and the game itself.